package com.fare.taluo.vo.core;

import javax.persistence.ManyToOne;

import org.apache.commons.lang3.StringUtils;

import com.fare.taluo.base.ddd.domain.annontation.HBaseColumn;

public class TransitchangeEntityVO {
	/**
	 * 
	 */
	private static final long serialVersionUID = 9069797263229076362L;

	/**
	 * 所属航班
	 */
	private FreightPriceEntityVO freightPriceEntityVO;

	private String transitFullName;

	private String transitCarrierKey;

	private String transitName;
	/**
	 * 出发城市
	 */
	private String fromCity;

	/**
	 * 到达城市
	 */
	private String toCity;

	/**
	 * 出发城市编码
	 */
	private String fromCityCode;

	/**
	 * 到达城市 编码
	 */
	private String toCityCode;

	private String fromAir;

	private String toAir;

	

	private Double hightPrice;

	private Double lowerPrice;

	private String flightTime;

	private String flightTyte;

/*新模型*/

	/**
	 * 运营商简称英文，如：MU
	 */
	private String carrierKey;

	/**
	 * 运营商简称中文，如：南航
	 */
	private String carrierName;

	/**
	 * 运营商全名，如：中国海南航空公司
	 */
	private String carrierFullName;

	/**
	 * 实际乘坐航班号，如 SC1234 实际乘坐CZ1234
	 */
	private String actuallyFlightNo;
    
	private String flightNo;
	
	/**
	 * 飞机类型
	 */
	private String flightType;

	/**
	 * 中转程中的起飞机场机场码
	 */
	private String fromAirPort;

	/**
	 * 中转程中的起飞机场名称
	 */
	private String fromAirPortName;

	/**
	 * 中转程中的目的机场机场码
	 */
	private String toAirPort;

	/**
	 * 中转程中的目的机场名称
	 */
	private String toAirPortName;
	
	private String startTime;

	private String endTime;
	/**
	 * 距离下一次再次起飞的间隔时间（如北京--纽约 中途中转上海，就是在上海停留的时间，再次起飞时间减去到达时间）
	 */
	private String stayTime;

	public FreightPriceEntityVO getFreightPriceEntityVO() {
		return freightPriceEntityVO;
	}

	public void setFreightPriceEntityVO(
			FreightPriceEntityVO freightPriceEntityVO) {
		this.freightPriceEntityVO = freightPriceEntityVO;
	}

	public String getTransitFullName() {
		return transitFullName;
	}

	public void setTransitFullName(String transitFullName) {
		this.transitFullName = transitFullName;
	}

	public String getTransitCarrierKey() {
		return transitCarrierKey;
	}

	public void setTransitCarrierKey(String transitCarrierKey) {
		this.transitCarrierKey = transitCarrierKey;
	}

	public String getTransitName() {
		return transitName;
	}

	public void setTransitName(String transitName) {
		this.transitName = transitName;
	}

	public String getFromCity() {
		return fromCity;
	}

	public void setFromCity(String fromCity) {
		this.fromCity = fromCity;
	}

	public String getToCity() {
		return toCity;
	}

	public void setToCity(String toCity) {
		this.toCity = toCity;
	}

	public String getFromCityCode() {
		return fromCityCode;
	}

	public void setFromCityCode(String fromCityCode) {
		this.fromCityCode = fromCityCode;
	}

	public String getToCityCode() {
		return toCityCode;
	}

	public void setToCityCode(String toCityCode) {
		this.toCityCode = toCityCode;
	}

	public String getFromAir() {
		return fromAir;
	}

	public void setFromAir(String fromAir) {
		this.fromAir = fromAir;
	}

	public String getToAir() {
		return toAir;
	}

	public void setToAir(String toAir) {
		this.toAir = toAir;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public Double getHightPrice() {
		return hightPrice;
	}

	public void setHightPrice(Double hightPrice) {
		this.hightPrice = hightPrice;
	}

	public Double getLowerPrice() {
		return lowerPrice;
	}

	public void setLowerPrice(Double lowerPrice) {
		this.lowerPrice = lowerPrice;
	}

	public String getFlightTime() {
		return flightTime;
	}

	public void setFlightTime(String flightTime) {
		this.flightTime = flightTime;
	}

	public String getFlightTyte() {
		return flightTyte;
	}

	public void setFlightTyte(String flightTyte) {
		this.flightTyte = flightTyte;
	}

	public String getFlightNo() {
		return flightNo;
	}

	public void setFlightNo(String flightNo) {
		this.flightNo = flightNo;
	}

	public String getCarrierKey() {
		return carrierKey;
	}

	public void setCarrierKey(String carrierKey) {
		this.carrierKey = carrierKey;
	}

	public String getCarrierName() {
		return carrierName;
	}

	public void setCarrierName(String carrierName) {
		this.carrierName = carrierName;
	}

	public String getCarrierFullName() {
		return carrierFullName;
	}

	public void setCarrierFullName(String carrierFullName) {
		this.carrierFullName = carrierFullName;
	}

	public String getActuallyFlightNo() {
		return actuallyFlightNo;
	}

	public void setActuallyFlightNo(String actuallyFlightNo) {
		this.actuallyFlightNo = actuallyFlightNo;
	}

	public String getFlightType() {
		return flightType;
	}

	public void setFlightType(String flightType) {
		this.flightType = flightType;
	}

	public String getFromAirPort() {
		return fromAirPort;
	}

	public void setFromAirPort(String fromAirPort) {
		this.fromAirPort = fromAirPort;
	}

	public String getFromAirPortName() {
		return fromAirPortName;
	}

	public void setFromAirPortName(String fromAirPortName) {
		this.fromAirPortName = fromAirPortName;
	}

	public String getToAirPort() {
		return toAirPort;
	}

	public void setToAirPort(String toAirPort) {
		this.toAirPort = toAirPort;
	}

	public String getToAirPortName() {
		return toAirPortName;
	}

	public void setToAirPortName(String toAirPortName) {
		this.toAirPortName = toAirPortName;
	}

	public String getStayTime() {
		return stayTime;
	}

	public void setStayTime(String stayTime) {
		this.stayTime = stayTime;
	}
	/**
	 * 一个格式化输出中转信息的方法
	 * @return
	 */
	public String getTransitInfoDesc(){
		StringBuilder sb = new StringBuilder();
		sb.append(StringUtils.isNotBlank(this.carrierFullName) ?
				this.carrierFullName:"");
		sb.append(StringUtils.isNotBlank(this.flightNo) ?
				this.flightNo:"");
		sb.append(StringUtils.isNotBlank(this.startTime) ?
				this.startTime.substring(8, 10)+":"+this.startTime.substring(10, 12):"");
		sb.append(StringUtils.isNotBlank(this.endTime) ?
				this.endTime.substring(8, 10)+":"+this.endTime.substring(10, 12):"");
		sb.append(StringUtils.isNotBlank(this.fromAirPortName) ?
				this.fromAirPortName:"");
		sb.append(StringUtils.isNotBlank(this.toAirPortName) ?
				this.toAirPortName:"");
		return sb.toString();
	}
}
